package com.qhy.springcloud;


import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.ComponentScans;

/**
 * @author qiuhongyu
 * @date 2020/9/25 18:24
 */
@SpringBootApplication
@EnableEurekaClient
//扫描fegin接口所在的包名使其生效
@EnableFeignClients(basePackages = {"com.qhy.springcloud.service"})
@ComponentScans({
        @ComponentScan("com.qhy.springcloud.service")
})
public class FeignCunsumerApplication {
    public static void main(String[] args) {
        try{
            SpringApplication.run(FeignCunsumerApplication.class, args);
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
